         Programming algorithm for SST39VF3201/3201B flash memories used on LPC185x/LPC435x Hitex boards
         ===============================================================================================


Date:    March 2012
Author:  NXP




LPC types:     LPC1850 Rev. A / LPC4350 Rev. A
==========



Board types:   Hitex LPC1850EVA-A1/A2/A3/A4
============



Flash types:   SST39VF3201:   4 Mbyte 16-bit flash used on the LPC18xx/LPC43xx Hitex board A1 and A4
============   SST39VF3201B:  4 Mbyte 16-bit flash used on the LPC18xx/LPC43xx Hitex board A2/A3/A4

               The two flashes differ slightly with regards to the erase/program commands. 
               Therefore the flash algorithm checks the flash ID and applies the correct commands.
   
                       

Debugger types: ULINK2, ULINK Pro, JLINK 
===============



Installation:  1) Copy the file SST39VF3201x_Hitex.FLM into the folder .\KEIL\ARM\Flash .
=============     The source folder "SST39VF3201x_LPC1850_Hitex_RevAx" can be copied as well, but that is optional.
               
               2) Copy the INI script "LPC18xx_43xx_ExtFlashProg.ini" in the scripts folder into a convenient place on 
                  your computer, where y<ou can find it easily.

               3) In uVision go to Flash -> Configure Flash Tools...
                  - Utilities: Provide the path to "LPC18xx_43xx_ExtFlashProg.ini" in the box for the Init File
                  - Utilities: Select your JTAG hardware debugger and then click on Settings. 
                       - Click on Add and select the right algorithm for your chip/board. It will apeear with 
                         the string "SST39VF3201x @ LPC1850-Hitex"
                       - Set the RAM area for the algorithm to 0x10000000 / 0x2000
                       - Choose the Download Functions you want to be executed when clicking
                         on the respective icon in the uVision icon bar



               
Known Problems:  No problems are known with respect to the erase/program algorithm. 
===============  However, the various possible combinations of eval board, JTAG box, boot mode, 
                 current processor state etc can lead to a problem with the debugger connection.
                 E.g. "No JTAG devices found", "JTAG communication problem", "SWD communication failure", "Flash Timeout"

                 It could be that a software which is already inside the flash was running when you connected with
                 the debugger, putting the chip into a state where it does not longer work on the JTAG as it should.
                 Then it helps to boot the chip in a different bootmode and then try to connect with the debugger



Recompilation:  Place the source folder into .\KEIL\ARM\Flash and then open the Vision project file.
==============

